package com.example.order.config;

import org.springframework.amqp.AmqpException;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessagePostProcessor;

public class ExpirationMessagePostProcessor implements MessagePostProcessor {

    @Override
    public Message postProcessMessage(Message message) throws AmqpException {
        int time = 7*24*60*60*1000;//过期时间7天
        message.getMessageProperties().setExpiration("10000");
        return message;
    }
}
